/*
 * @Author: your name
 * @Date: 2020-07-29 18:13:43
 * @LastEditTime: 2020-08-05 17:05:29
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \dcg-vue-init\src\router\modules\user.js
 */
import layout from '@/layout'
const categoryRouter = {
  path: '/category',
  component: layout,
  redirect: '/category/list',
  name: '分类模块',
  meta: {
    title: 'category',
    icon: 'category',
    roles: ['editor']
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/category/list'),
      name: '分类列表',
      meta: { title: '分类列表' }
    },
    {
      path: 'edit',
      component: () => import('@/views/category/edit'),
      name: '编辑分类',
      meta: { title: 'edit category' },
      redirect: '/category/listTwo',
      children: [
        {
          path: 'listTwo',
          component: () => import('@/views/category/listTwo'),
          name: '二级分类',
          redirect: '/category/listTwo/listTwoTwo',
          meta: { title: '二级分类' },
          children: [
            {
              path: 'listTwoTwo',
              component: () => import('@/views/category/listTwoTwo'),
              name: '二二级分类',
              meta: { title: '三级分类' }
            },
            {
              path: 'listThree',
              component: () => import('@/views/category/listTwoThree'),
              name: '二三级分类',
              meta: { title: '三级分类' }
            }
          ]
        },
        {
          path: 'listThree',
          component: () => import('@/views/category/listThree'),
          name: '三级分类',
          meta: { title: '三级分类' }
        },
        {
          path: 'listFour',
          component: () => import('@/views/category/listFour'),
          name: '四级分类',
          meta: { title: '四级分类' }
        }
      ]
    },
    {
      path: 'delete',
      component: () => import('@/views/category/delete'),
      name: '删除分类',
      meta: { title: 'add category' }
    },
    {
      path: 'add',
      component: () => import('@/views/category/add'),
      name: '添加分类',
      meta: { title: '添加分类' }
    }
  ]
}

export default categoryRouter
